<?php

class HomeController extends DRX_Controller 
{
    function sendfriendAction()
    {
        $smarty 	= DRX::load("smarty");
		
		$smarty->assign("title","Homepage");
		$content = $smarty->fetch("home/send_friend.tpl");
		$smarty->assign("content",$content);
		
		$topmenu	= new Topmenu();
		$topmenu->prepareTopMenu();
			
		$smarty->display("solvay.tpl");
    }
    
	function indexAction()
	{		

		$smarty 	= DRX::load("smarty");
		
		$layout = new Layout();

		$args['topmenu_id'] = 0; //fake

		$layout->prepareLayout($args);
		$news = new News();
		$news_list = $news->getHomepageNews();
		$latest_news = array_shift($news_list);
                
                $brands = new AlumniBrand();
                $listBrands = $brands->getBrandHome();
                $smarty->assign("brands",$listBrands);
                
                $events = new AlumniEvent();
                $listUpcommingEvents = $events->getUpcommingEvent();
                $smarty->assign("events",$listUpcommingEvents);
                
		$smarty->assign("title","Homepage");
		$smarty->assign("latest_news",$latest_news);
		$smarty->assign("news_list",$news_list);
		$content = $smarty->fetch("home/home.tpl");
		$smarty->assign("content",$content);

		$smarty->display("solvay.tpl");
	}
	
	function contestAction(){
		$smarty 	= DRX::load("smarty");
		$content = $smarty->fetch("home/contest.tpl");
		$smarty->assign("content",$content);		
		$smarty->display("solvay.tpl");
	}
}
?>